﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Articles.master" AutoEventWireup="false" CodeFile="ListArticles.aspx.vb" Inherits="ListArticles" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:GridView ID="DGArticles" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ID" DataSourceID="DSArticles">
        <Columns>
            <asp:BoundField DataField="Topic" HeaderText="Topic" SortExpression="Topic" />
            <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="ArticleDetails.aspx?ID={0}" 
                HeaderText="Details" Text="View Details" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="DSArticles" runat="server" 
        ConnectionString="<%$ ConnectionStrings:myFirstDatabase %>" 
        ProviderName="<%$ ConnectionStrings:myFirstDatabase.ProviderName %>" 
        SelectCommand="SELECT [Topic], [Title], [ID] FROM [tblArticles]"></asp:SqlDataSource>
</asp:Content>

